#pragma once
#include <WinSock.h>
#include "Message.h"


///client.
class CClientNet
{
public:
	CClientNet(void);
	~CClientNet(void);
	BOOL Init();
	BOOL Connect(long ip);
	void DisConnect();
	BOOL StartRunning();
	int Validate(LoginMessage* logininfo);
	static void ThreadProcess(LPVOID lpParam);
	long GetHostAddress();
	HWND m_ParentWnd;
	SOCKET m_Socket;
	BOOL m_Running;
private:
	HANDLE m_ThreadHandle;
	
	

};
